<?php
namespace app\home\validate;
use think\Validate;

class Address extends Validate
{
    protected $rule = [
    'address_uname'  => 'require|min:2|max:20',
    'address_tell' => 'require|number|length:11',
    'address_content'   => 'require|max:100'
    ];

    protected $message = [
    'address_uname.require'     => '收货人姓名必须填写',
    'address_uname.min'         => '收货人姓名长度不能少于2位',
    'address_uname.max'         => '收货人姓名长度最多20位',
    'address_tell.require'      => '电话必须填写',
    'address_tell.number'       => '电话号码只能存在数字',
    'address_tell.length'       => '不是11位的电话号码',
    'address_content.require'   => '地址内容必须填写',
    'address_content.min'       => '地址内容长度最多100位'
    ];
}
?>